import Mock from "mockjs"
Mock.setup({
    timeout: 200
})
let AllApi: any = [{
    url: "/hubinghua/getProject",
    method: "get",
    response: (response: any) => {
        console.log(response)
        return [{ text: "精选",id:1 }, { text: "分类",id:2 }, { text: "归档",id:3 }, { text: "关于",id:4 },{ text: "其他",id:5 }]
    }
}, {
    url: "/hubinghua/getUsedProject",
    method: "get",
    response: (response: any) => {
        console.log(response)
        return [{ text: "精选",id:1 }, { text: "分类",id:2 }, { text: "归档",id:3 }, { text: "关于",id:4 },{ text: "其他",id:5 }]
    }
}]
AllApi.forEach((item: any) => {
    const url = item.url
    Mock.mock(RegExp(url + ".*"), item.method, (options: any) => {
        console.log(options)
        return Mock.mock(item.response)
    })
})